/* CSS Variables for Brand Colors */
:root {
    --color-brand-primary: #4a154b;
    --color-brand-secondary: #2eb67d;
    --color-brand-accent: #007bff;
}

.language-switcher-welcome .btn {
    border: 1px solid #ccc;
}

/* Modern Pricing Cards Design */
.pricing-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid hsla(134, 61%, 41%, 0.255);
}

.pricing-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.pricing-card:hover {
    border: 2px solid var(--color-brand-secondary);
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    z-index: 3;
}

.popular-badge .badge {
    background: linear-gradient(45deg, var(--color-brand-secondary), #2eb67d);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Plan Selection */
.plan-selection {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-brand-primary);
}

.plan-selection .form-check-label {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    margin: 0;
}

/* Plan Header */
.plan-header {
    margin-bottom: 10px;
    padding-top: 20px;
}

.plan-title {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Plan Pricing */
.price-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.price-value {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.currency {
    font-size: 1.5rem;
    color: var(--color-brand-primary);
    font-weight: 600;
}

.example-price-badge small {
    font-size: 1.5rem;
    color: var(--color-brand-primary);
    font-weight: 600;
}

.amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.pricing-breakdown {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

/* Plan Features */
.plan-features {
    flex-grow: 1;
    margin-bottom: 30px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 12px;
}

.features-list li i {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e8;
    border-radius: 50%;
    font-size: 10px;
}

.student-range {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    color: #495057;
    font-weight: 500;
}

.student-range i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Plan Actions */
.plan-actions .btn {
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-actions .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, var(--color-brand-secondary), transparent);
    transition: left 0.5s;
}

.plan-actions .btn:hover:before {
    left: 100%;
}

.plan-actions .btn-lg {
    padding: 15px 30px;
    font-size: 14px;
}

.btn:hover small {
    color: #ffffff;
}

/* Loading Spinner */
.loading-spinner i {
    color: var(--color-brand-primary);
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .pricing-card.pricing-popular {
        transform: scale(1);
        margin-bottom: 30px;
    }

    .pricing-card.pricing-popular:hover {
        transform: translateY(-10px);
    }

    .plan-title {
        font-size: 1.6rem;
    }

    .amount {
        font-size: 3rem;
    }
}

@media (max-width: 767.98px) {
    .pricing-card {
        padding: 25px 20px;
    }

    .plan-title {
        font-size: 1.4rem;
    }

    .amount {
        font-size: 2.5rem;
    }

    .plan-actions .btn-lg {
        padding: 12px 25px;
        font-size: 13px;
    }
}

/* Animation for card entrance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card {
    animation: slideInUp 0.6s ease-out;
}

.pricing-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pricing-card:nth-child(3) {
    animation-delay: 0.4s;
}

.pricing-card:nth-child(4) {
    animation-delay: 0.6s;
}

/* Focus states for accessibility */
.plan-checkbox:focus {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.plan-actions .btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.pricing-card.pricing-selected {
    border-color: var(--color-brand-secondary) !important;
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.4) !important;
    transform: scale(1.02) translateY(-5px);
}

.pricing-card.pricing-selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-brand-secondary), #2eb67d);
    border-radius: 22px;
    z-index: -1;
}

.plan-checkbox {
    cursor: pointer;
}

.loading-spinner i {
    color: var(--color-brand-primary);
}

.pricing-breakdown {
    min-height: 20px;
}

.card.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.btn:not(.btn-outline-secondary):hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.plan-invalid {
    opacity: 0.6;
    filter: grayscale(50%);
}

.plan-invalid .pricing-card {
    border-color: #e3342f !important;
    background-color: #f8f9fa;
    pointer-events: none;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.text-warning {
    color: #ffc107 !important;
}

/* Continue with Selected Button Styling */
#continue-with-selected {
    background: linear-gradient(45deg, var(--color-brand-primary), #007bff);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

#continue-with-selected:hover {
    background: linear-gradient(45deg, #007bff, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#continue-with-selected:disabled {
    background: #6c757d;
    box-shadow: none;
    transform: none;
}

/* ==========================================
   COMPARISON TABLE STYLES
   ========================================== */

.comparison-table-wrapper {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.comparison-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0;
}

/* Main billing toggle specific styles */
.main-billing-toggle .btn-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

.main-billing-toggle .btn {
    border-radius: 0;
    padding: 12px 24px;
    font-weight: 500;
    border: 2px solid var(--color-brand-primary);
    color: var(--color-brand-primary);
    background: #ffffff;
}

.main-billing-toggle .btn.active {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-billing-toggle .btn:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
}

/* Comparison table billing toggle specific styles */
.comparison-billing-toggle .btn-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

.comparison-billing-toggle .btn {
    border-radius: 0;
    padding: 12px 24px;
    font-weight: 500;
    border: 2px solid var(--color-brand-primary);
    color: var(--color-brand-primary);
    background: #ffffff;
}

.comparison-billing-toggle .btn.active {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comparison-billing-toggle .btn:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.main-billing-toggle .btn:hover small {
    color: inherit;
}

.comparison-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #e9ecef;
    padding: 1rem;
    vertical-align: middle;
    text-align: center;
    position: relative;
}

.comparison-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid var(--color-brand-primary);
}

.comparison-table th.feature-column {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    color: #ffffff;
    text-align: left;
    width: 25%;
}

.comparison-table th.plan-column {
    width: 25%;
}

.plan-header-cell {
    padding: 1rem 0;
}

.plan-name {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.plan-price {
    margin-bottom: 1rem;
}

.price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    font-weight: 700;
    color: var(--color-brand-primary);
}

.price-amount .currency {
    font-size: 1rem;
}

.price-amount .amount {
    font-size: 1.5rem;
}

.price-amount .period {
    font-size: 0.875rem;
    color: #6c757d;
}

.get-started-btn {
    background: linear-gradient(135deg, var(--color-brand-secondary) 0%, #2eb67d 100%);
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.get-started-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #2eb67d 0%, var(--color-brand-secondary) 100%);
}

.feature-row:nth-child(even) {
    background: rgba(0, 123, 255, 0.02);
}

.feature-row:hover {
    background: rgba(0, 123, 255, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.feature-name {
    font-weight: 600;
    color: #2c3e50;
    text-align: left !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.feature-name i {
    color: var(--color-brand-primary);
    width: 20px;
}

.feature-value {
    color: #495057;
    font-weight: 500;
}

.feature-value.unlimited {
    color: var(--color-brand-secondary);
    font-weight: 600;
}

.feature-value.limited {
    color: #ffc107;
    font-weight: 600;
}

/* Table responsiveness */
@media (max-width: 768px) {
    .comparison-table-wrapper {
        padding: 1rem;
        margin: 1rem 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .plan-name {
        font-size: 1rem;
    }

    .price-amount .amount {
        font-size: 1.25rem;
    }

    .billing-toggle .btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

/* Animation for table appearance */
#comparison-table-container {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button styling */
#close-comparison {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#close-comparison:hover {
    background: #e3342f;
    color: #ffffff;
    transform: rotate(90deg);
}

/* ==========================================
   MAIN PLANS BILLING TOGGLE
   ========================================== */

.price-updating {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.monthly-price,
.yearly-price {
    transition: all 0.3s ease;
}

/* Main plans billing toggle animation */
.main-billing-toggle .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-billing-toggle .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-brand-secondary), transparent);
    transition: left 0.5s ease;
}

.main-billing-toggle .btn:hover::before {
    left: 100%;
}

.main-billing-toggle .btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Plan card hover effect enhancement */

.btn-group>.btn-group:not(:first-child),
.btn-group>.btn:not(:first-child) {
    margin-left: 2px;
}

.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show>.btn-outline-primary.dropdown-toggle {
    color: #ffffff;
    background-color: inherit;
    border-color: inherit;
}

/* ==========================================
   FLASH SALE STYLING
   ========================================== */

/* Flash Sale Banner */
.flash-sale-banner {
    background: linear-gradient(135deg, #ff8100 0%, #ffa500 100%);
    border: 2px solid #ffac01;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    animation: flashPulse 2s ease-in-out infinite;
}

.flash-sale-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: flashSweep 3s ease-in-out infinite;
}

.flash-sale-content {
    padding: 0.75rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.flash-sale-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8B4513;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.flash-sale-subtext {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8B4513;
}

.countdown-timer {
    font-weight: 800;
    color: #DC143C;
}

/* Flash Sale Pricing */

.original-price-line {
    margin-bottom: 0.5rem;
}

.original-price-crossed,
.original-student-crossed {
    font-size: 1rem;
    text-decoration: line-through;
    color: #6c757d;
    font-weight: 500;
}

.discounted-price-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: #DC143C !important;
    line-height: 1;
    margin: 0.5rem 0;
}

.currency-flash {
    font-size: 1.5rem;
    vertical-align: top;
}

.amount-flash {
    font-size: 2.5rem;
    font-weight: 800;
}

.period-flash {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6c757d;
}

.discounted-student-price {
    color: #DC143C;
    font-weight: 600;
    font-size: 1rem;
}

.student-price-flash {
    color: #DC143C;
    font-weight: 600;
}

.flash-savings-badge {
    background: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 300;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgb(67 67 67 / 30%);
}

/* Combined Savings for Yearly */
.combined-discounts-info {
    background: linear-gradient(135deg, var(--color-brand-primary), #007bff);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: inline-block;
    font-size: 0.75rem;
}

.combined-savings {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--color-brand-secondary);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.savings-breakdown {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Regular pricing (when no flash sale) */
.student-price-regular {
    color: #6c757d;
    font-size: 1.2rem;
}

.student-price-yearly {
    font-size: 1rem;
    font-weight: 600;
}

/* Flash sale note */
.flash-sale-note {
    font-style: italic;
    color: #6c757d;
}

/* Animations */
@keyframes flashPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 140, 0, 0.8), 0 0 30px rgba(255, 140, 0, 0.6);
    }
}

@keyframes flashSweep {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Legacy styles for non-flash sale periods */
.original-price {
    font-size: 0.9rem;
    opacity: 0.7;
}

.savings-message .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yearly-price .price-amount {
    color: var(--color-brand-secondary) !important;
}

.yearly-price .price-amount .amount {
    color: var(--color-brand-secondary) !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .flash-sale-banner {
        margin: 0.5rem 0;
    }

    .flash-sale-header {
        font-size: 0.75rem;
    }

    .flash-sale-subtext {
        font-size: 0.7rem;
    }

    .discounted-price-main {
        font-size: 2rem;
    }

    .amount-flash {
        font-size: 2rem;
    }

    .currency-flash {
        font-size: 1.2rem;
    }

    .flash-savings-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Main billing toggle button radius fixes */
.main-billing-toggle .btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
}

.main-billing-toggle .btn-group>.btn:not(:first-child):not(.dropdown-toggle) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

/* Comparison billing toggle button radius fixes */
.comparison-billing-toggle .btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
}

.comparison-billing-toggle .btn-group>.btn:not(:first-child):not(.dropdown-toggle) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}
